//
//  HomeCellButton.swift
//  SinaWeiBo
//
//  Created by ZKJ on 2017/9/16.
//  Copyright © 2017年 ZKJ. All rights reserved.
//

import UIKit

class HomeCellButton: UIButton {

//    override init(frame: CGRect) {
//        super.init(frame: frame)
//        imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 10)
//        titleEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)
//    }
//    
//    required init?(coder aDecoder: NSCoder) {
//        fatalError("init(coder:) has not been implemented")
//    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        imageView?.frame.origin.x = frame.size.width * 0.5 - 2 - (imageView?.frame.width)!;
        titleLabel?.frame.origin.x = frame.size.width * 0.5 + 2;
    }

}
